import SMERouter from 'sme-router';
import active from './active'
import position from '../controller/positionController'

//第一个参数domid,第二个参数路由的类型：hash,html5,默认是hash
var router = new SMERouter("main-container")

router.use(active);

router.route('/index', (req, res) => {
  res.render('index page')
})


router.route('/position/index', position.render.bind(position))


router.route('/position/add', position.addRender)


router.route('/position/edit/:id', position.editRender)

router.route('*', (req, res) => {
  res.redirect('/index')
})

export default router;